package com.flowable.listener;

import org.springframework.stereotype.Component;

import java.time.LocalDate;

/**
 * 长沙先飞信息科技有限公司<br>
 * Created with IntelliJ IDEA.<br>
 * Date:2024/8/1<br>
 * Time:11:50<br>
 * 功能描述：<br>
 *
 * @author huang hou chun
 * @since JDK 1.8 <br>
 * Copyright (c) 2023 www.csxfrj.com System Incorporated All Rights Reserved.
 */
@Component
public class DateConditionHandler {

    public boolean dayAfter(LocalDate date, Long dayNum) {
        return LocalDate.now().isAfter(date.plusDays(dayNum));
    }

    public boolean dayBefore(LocalDate date, Long dayNum) {
        return LocalDate.now().isBefore(date.plusDays(dayNum));
    }
}
